#!/bin/bash
if [ $# -ne 2 ]
then 
    echo "Usage: <command> <image name> <image tag>"
    exit -1
fi

imgName=$1
imgTag=$2

echo run docker image ${imgName}:${imgTag}

docker run --gpus all \
    --env NVIDIA_DRIVER_CAPABILITIES="utility,compute" \
    -v "${HOME}/data:/mnt/data \"
    -v "${HOME}/model:/mnt/model \"
    -v "${HOME}/work:/mnt/work \"
    -v "${HOME}/download:/mnt/download \"
    -v "${HOME}/autotest:/mnt/autotest \"
    -v "${HOME}/tmp:/mnt/tmp \"
    -v "${HOME}/TSM-RNE-NNDT:/mnt/TSM-RNE-NNDT \"
    -v "${HOME}/tmp/guide_filter:/mnt/guide-filter \"
    -v /usr/share/perl5:/mnt/perl5 \
    -u ljs \
    -w /home/ljs \
    -it ${imgName}:${imgTag}

